﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Dapper_Core.Common
{
    public  static class StringExt
    {
        /// <summary>
        /// 判断是否包含字符串（忽略大小写）
        /// </summary>
        /// <param name="source"></param>
        /// <param name="part"></param>
        /// <returns></returns>
        public static bool ContainsIgnoreCase(this string source, string part)
        {
            if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(part)) return false;
            return source.IndexOf(part, StringComparison.OrdinalIgnoreCase) > -1;
        }
    }
}
